package com.mathdroid.model.abilities.specs.sniper;

import com.mathdroid.model.abilities.Ability;
import com.mathdroid.model.enums.EDmgType;

public final class FragmentationGrenade extends Ability {

	/**
	 * Generated UID.
	 */
	private static final long serialVersionUID = -630703814245996352L;

	public FragmentationGrenade() {
		this.setName("Fragmentation Grenade");
		this.setIconName("remotedetonationmine");
		this.setResource("Energy");
		this.setCost(20d);
		this.setDescription(
				"Throws a fragmentation grenade that deals 1462 - 1813 " +
				"kinetic damage to up to 5 enemies in an 8-meter radius. " +
				"If the primary target is standard or weak, it is knocked " +
				"down by the blast.");
		this.setCooldownMs(6000d);
		this.setDirectDamageType(EDmgType.KINETIC);
		
		this.setStandardHealthPercentMax(0.149);
		this.setStandardHealthPercentMin(0.109);
		this.setCoefficient(1.29);
		
		this.setTrainableLevel(3);
	}

	@Override
	public String getDescription() {
		return "Throws a fragmentation grenade that deals " 
			+ this.getMinDirect() + " - " + this.getMaxDirect() + " " +
			"kinetic damage to up to 5 enemies in an 8-meter radius. " +
			"If the primary target is standard or weak, it is knocked " +
			"down by the blast.";
	}
	
	@Override
	public double getMinPeriodic() {
		return 0d;
	}

	@Override
	public double getMaxPeriodic() {
		return 0d;
	}

	@Override
	public double getMinDirect() {
		return
			this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMin() 
			* this.getStdDmg();
	}

	@Override
	public double getMaxDirect() {
		return
			this.getCoefficient() 
			* this.getCharStats().getTotalBonusDamageTechForce()
		
			+ this.getStandardHealthPercentMax() 
			* this.getStdDmg();
	}

}
